import 'virtual:uno.css'

import {
	createSSRApp
} from "vue";
import App from "./App.vue";

import {
	createPinia
} from 'pinia'
import persist from 'pinia-plugin-persistedstate'

// 创建 pinia 实例
const pinia = createPinia()
// 使用持久化存储插件
pinia.use(persist)

//缓存
import store from '@/store';

import page_extends from '@/hooks/page_extends'
export function createApp() {
	const app = createSSRApp(App);

	app.use(pinia)
	app.use(page_extends)
	app.config.globalProperties.$store = store;

	return {
		app,
	};
}